package com.xy.bizport.data;

import java.util.Date;

import android.os.Parcel;
import android.os.Parcelable;

public class MyDate extends Date implements Parcelable {
    private static final long serialVersionUID = 1L;
    
    public MyDate() {
        super();
    }

    public MyDate(Date date) {
        super(date.getTime());
    }
    
    public MyDate(Parcel parcel) {
        super(parcel.readLong());
    }
    
    public static final Creator<MyDate> CREATOR = new Creator<MyDate>() {
        public MyDate createFromParcel(Parcel in) {
            return new MyDate(in);
        }

        public MyDate[] newArray(int size) {
            return new MyDate[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(getTime());        
    }

}
